import request from '@/utils/request'

// 查询用户消费明细记录列表
export function listConsumption(query) {
  return request({
    url: '/platform/consumption/list',
    method: 'get',
    params: query
  })
}

// 查询用户消费明细记录详细
export function getConsumption(consumptionRecordId) {
  return request({
    url: '/platform/consumption/' + consumptionRecordId,
    method: 'get'
  })
}

// 新增用户消费明细记录
export function addConsumption(data) {
  return request({
    url: '/platform/consumption',
    method: 'post',
    data: data
  })
}

// 修改用户消费明细记录
export function updateConsumption(data) {
  return request({
    url: '/platform/consumption',
    method: 'put',
    data: data
  })
}

// 删除用户消费明细记录
export function delConsumption(consumptionRecordId) {
  return request({
    url: '/platform/consumption/' + consumptionRecordId,
    method: 'delete'
  })
}
